package com.ruoyi.bole.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.stream.Collectors;

@RestController
@RequestMapping("/bole/userinfo")
public class UserController {
    @Autowired
    private ISysUserService userService;
    @GetMapping("/{userId}" )
    public AjaxResult getInfo(@PathVariable Long userId)
    {
        System.out.println(111);
        AjaxResult ajax = AjaxResult.success();
        ajax.put("data",userService.selectUserById(userId));

        return ajax;
    }
}
